/**  
 * All rights Reserved, Designed By www.flksh.com
 * @date:   2017-10-28 09:15:02   
 * @Copyright: 2013-2017 www.flksh.com Inc. All rights reserved. 
 * 注意：本内容仅限于上海福乐康社区养老服务有限公司内部传阅，禁止外泄以及用于其他的商业目
 */
package com.zx.cloud.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zx.cloud.domain.RoleResource;
import com.zx.cloud.persistence.CrudMapper;
import com.zx.cloud.persistence.RoleResourceMapper;

/**
 * 角色与权限
 */
@Service
public class RoleResourceService extends CrudServiceImpl<RoleResource> {

	private static final Logger LOGGER = LoggerFactory
			.getLogger(RoleResourceService.class);

	@Autowired
	private RoleResourceMapper roleResourceMapper;

	@Autowired
	public RoleResourceService(CrudMapper<RoleResource> mapper) {
		super(mapper);
	}

	public int deleteByRoleId(RoleResource roleResource) {
		return roleResourceMapper.deleteByRoleId(roleResource);
	}

	/**
	 * @param 根据id查询角色与权限信息
	 * @param gmc
	 * @param roleResource
	 *            角色与权限实体类
	 * @return
	 */
	public List<RoleResource> queryByRoleId(long roleId) {
        return roleResourceMapper.queryByRoleId(roleId);
	}

}
